# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=py3-ufolib2
pkgver=0.11.4
pkgrel=1
pkgdesc="UFO font library"
url="https://github.com/fonttools/ufoLib2"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-attrs py3-fonttools"
makedepends="py3-setuptools py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest py3-pytest-cov"
source="$pkgname-$pkgver.tar.gz::https://github.com/fonttools/ufoLib2/archive/v$pkgver.tar.gz"
builddir="$srcdir/ufoLib2-$pkgver"

prepare() {
	default_prepare
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD/build/lib" pytest-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
276118e441a9a731b11c9b56703d09e195f85b04c967bade18dff6e0b99c8a9a9d8c29eb4e5c700b4afa9689ae0c0273df678af48a433acd4dcf0dffee3132f2  py3-ufolib2-0.11.4.tar.gz
"
